#include <iostream>
#include <string>
using namespace std;



int main(int argc, char const *argv[])
{
    string s1;
    string s2;

    cout<<"请输入一个字符串:"<<endl;
    cin>>s1;
    cout<<"请输入另一个字符串:"<<endl;
    cin>>s2;

    size_t pos = s1.find(s2);

    if(pos != string::npos)
    {
        cout<<"s2是s1的子字符串，起始位置为:"<<pos<<endl;
    }
    else
    {
        cout<<"s2不是s1的子字符串"<<endl;
    }

    return 0;
}
